import { useRoomList } from "@/hooks/useRoomList";
import type { SelectedRoomListMessageData } from "../types/MessageData";

export const selectedRoomListHandler = (payload: SelectedRoomListMessageData["payload"]) => {
	const roomList = useRoomList();
	roomList.rooms.length = 0;
	roomList.rooms.push(...payload.rooms);
};
